function [velP,velM,velP_ind,velM_ind,velP_raw,velM_raw]=get_vel_ind_from_adata_M1(aux_data)
velM=diff(aux_data(5,:));
velM(velM>5)=velM(velM>5)-10;
velM(velM<-5)=velM(velM<-5)+10;
velM_raw=velM;
velM=ftfil(velM,1000,0,10);

velP=diff(aux_data(8,:));
velP(velP>5)=velP(velP>5)-10;
velP(velP<-5)=velP(velP<-5)+10;
velP_raw=velP;
velP=ftfil(velP,1000,0,10);

velP_ind=((smooth2(abs(velP),1000))>0.01);
velM_ind=((smooth2(abs(velM),1000))>0.01);

% velP_ind=downsample(velP_ind,10);
% velM_ind=downsample(velM_ind,10);
% 
% figure;plot(velP_ind)
% figure;plot(velM_ind)
